﻿using UnityEngine;
using System.Collections;

public class PlayerBehaviourState
{

    public bool Jumping { get; set; }           //是否处于第一次跳跃状态
    public bool DoubleJumping { get; set; }     //是否处于第二次跳跃状态

    private bool justStartJump = false;
    private int numberOfJumps = 2;      //可跳跃总次数
    private bool canMoveFreely = true;
    private bool jumpButtonPressed = false;
    private bool ladderBehind = false;
    private bool canClimbeLadder = true;
    private bool ladderClimbing = false;
    private bool doorBehind = false;
    private bool canChangeStage = true;
    private bool canJump = true;
    private bool isDead = false;
    public bool IsDashing { get; set; }
    public bool StayInAir { get; set; }
    public bool CanBeHurt { get; set; }

    //get set
    public int NumberOfJumps
    {
        get
        {
            return numberOfJumps;
        }

        set
        {
            numberOfJumps = value;
        }
    }

    public bool JustStartJump
    {
        get
        {
            return justStartJump;
        }

        set
        {
            justStartJump = value;
        }
    }

    public bool JumpButtonPressed
    {
        get
        {
            return jumpButtonPressed;
        }

        set
        {
            jumpButtonPressed = value;
        }
    }

    public bool LadderBehind
    {
        get
        {
            return ladderBehind;
        }

        set
        {
            ladderBehind = value;
        }
    }

    public bool CanClimbeLadder
    {
        get
        {
            return canClimbeLadder;
        }

        set
        {
            canClimbeLadder = value;
        }
    }

    public bool LadderClimbing
    {
        get
        {
            return ladderClimbing;
        }

        set
        {
            ladderClimbing = value;
        }
    }

    public bool DoorBehind
    {
        get
        {
            return doorBehind;
        }

        set
        {
            doorBehind = value;
        }
    }

    public bool CanChangeStage
    {
        get
        {
            return canChangeStage;
        }

        set
        {
            canChangeStage = value;
        }
    }

    public bool CanJump
    {
        get
        {
            return canJump;
        }

        set
        {
            canJump = value;
        }
    }

    public bool CanMoveFreely
    {
        get
        {
            return canMoveFreely;
        }

        set
        {
            canMoveFreely = value;
        }
    }

    public bool IsDead
    {
        get
        {
            return isDead;
        }

        set
        {
            isDead = value;
        }
    }

    //初始化
    public void init()
    {
        NumberOfJumps = PersistParameter.jumpTime;
        Jumping = false;
        DoubleJumping = false;
    }

    public PlayerBehaviourState()
    {
        this.init();
    }
}
